import request from "../../common/request";

//
export function taskList(data) {
    return request.request({
      url: `/experiment-task/list`,
      method: "get",
      params: data,
    });
}
//数据管理
export function processList(data) {
  return request.request({
    url: `/experiment-process/list`,
    method: "get",
    params: data,
  });
}
//设备管理 /experiment-device/list
export function deviceList(data) {
  return request.request({
    url: `/experiment-device/list`,
    method: "get",
    params: data,
  });
}
//需求中心
export function requirementList(data) {
  return request.request({
    url: `/experiment-requirement/list`,
    method: "get",
    params: data,
  });
}
//编辑需求 /experiment-requirement/update
export function requirementEdit(data) {
  return request.request({
    url: `/experiment-requirement/update`,
    method: "post",
    data: data,
  });
}
//新增需求
export function requirementAdd(data) {
  return request.request({
    url: `/experiment-requirement/add`,
    method: "post",
    data: data,
  });
}
//删除需求
export function requirementDel(data) {
  return request.request({
    url: `/experiment-requirement/delete`,
    method: "post",
    data: data,
  });
}
//获取实验需求检测项目 /experiment-requirement/process-detail/{id}
export function processDetailId(data) {
  return request.request({
    url: `/experiment-requirement/process-detail/${data}`,
    method: "post",
    data: data,
  });
}
//全部检测项目 /experiment-process-detail/list
export function processAllList(data) {
  return request.request({
    url: `/experiment-process-detail/list`,
    method: "get",
    data: data,
  });
}
//实验助手 /experimenter/idle-list
export function idleList(data) {
  return request.request({
    url: `/experimenter/idle-list`,
    method: "post",
    data: data,
  });
}
//发布任务
export function taskAdd(data) {
  return request.request({
    url: `/experiment-task/add`,
    method: "post",
    data: data,
  });
}
//编辑任务
export function taskEdit(data) {
  return request.request({
    url: `/experiment-task/update`,
    method: "post",
    data: data,
  });
}
//任务选择列表 /experiment-requirement/list
export function chooseRequirList(data) {
  return request.request({
    url: `/experiment-requirement/list`,
    method: "get",
    data: data,
  });
}
//新增工艺类型  /experiment-process/add
export function processAdd(data) {
  return request.request({
    url: `/experiment-process/add`,
    method: "post",
    data: data,
  });
}
//修改工艺类型
export function processEdit(data) {
  return request.request({
    url: `/experiment-process/update`,
    method: "post",
    data: data,
  });
}
//删除工艺类型
export function processDel(data) {
  return request.request({
    url: `/experiment-process/delete`,
    method: "post",
    data: data,
  });
}
//工艺类型详情 processId
export function processDetailList(data) {
  return request.request({
    url: `/experiment-process-detail/list`,
    method: "get",
    data: data,
  });
}
//新增工艺类型详情
export function processDetailAdd(data) {
  return request.request({
      url: `/experiment-process-detail/add`,
      method: 'post',
      data,
  })
}
//修改工艺类型详情
export function processDetailEdit(data) {
  return request.request({
      url: `/experiment-process-detail/update`,
      method: 'post',
      data,
  })
}
//删除工艺类型详情
export function processDetailDel(data) {
  return request.request({
      url: `/experiment-process-detail/delete`,
      method: 'post',
      data,
  })
}
//删除任务 
export function taskDel(data) {
  return request.request({
      url: `/experiment-task/delete`,
      method: 'post',
      data,
  })
}
//反馈内容 /experiment-task/feedback
export function taskFeedback(data) {
  return request.request({
      url: `/experiment-task/feedback`,
      method: 'post',
      data,
  })
}
//我的任务 /experiment-task/my-task
export function myTaskList(data) {
  return request.request({
      url: `/experiment-task/my-task`,
      method: 'post',
      data,
  })
}
//开始任务 /experiment-task/start/{id}
export function startTaskFlag(data) {
  return request.request({
      url: `/experiment-task/start`,
      method: 'post',
      data,
  })
}
//获取实验设备报修 /experiment-device-repair/{id}
export function getDeviceRepair(data) {
  return request.request({
      url: `/experiment-device-repair/device/${data}`,
      method: 'post',
      data,
  })
}
//任务详情数据 /experiment-task/detail/{id}
export function taskDetailData(data) {
  return request.request({
      url: `/experiment-task/detail/${data}`,
      method: 'get',
      data,
  })
}
//添加设备报修 /experiment-device-repair/add
export function repairErrAdd(data) {
  return request.request({
      url: `/experiment-device-repair/add`,
      method: 'post',
      data,
  })
}
//完成任务 /experiment-task/finish/
export function finishData(data) {
  return request.request({
      url: `/experiment-task/finish`,
      method: 'post',
      data,
  })
}